Fix some compilation warnings
authorJavier Jardón <jjardon@gnome.org>
Fri, 30 Oct 2009 03:47:19 +0000 (04:47 +0100)
committerJavier Jardón <jjardon@gnome.org>
Fri, 30 Oct 2009 17:36:03 +0000 (18:36 +0100)
Use proper gint8 array variable instead a string

gtk/gtkclist.c
gtk/gtkctree.c

index 2d0f6bc32f0cccc8ec3a9f4c363078fa0c901a15..9117f8c781baf9b5c9e7ebd8a48c76846e56c680 100644 (file)
@@ -1925,8 +1925,10 @@ abort_column_resize (GtkCList *clist)
 
   if (GTK_CLIST_ADD_MODE(clist))
     {
+      gint8 dashes[] = { 4, 4 };
+
       gdk_gc_set_line_attributes (clist->xor_gc, 1, GDK_LINE_ON_OFF_DASH, 0,0);
-      gdk_gc_set_dashes (clist->xor_gc, 0, "\4\4", 2);
+      gdk_gc_set_dashes (clist->xor_gc, 0, dashes, G_N_ELEMENTS (dashes));
     }
 }
 
@@ -3666,10 +3668,12 @@ toggle_add_mode (GtkCList *clist)
   gtk_clist_draw_focus (GTK_WIDGET (clist));
   if (!GTK_CLIST_ADD_MODE(clist))
     {
+      gint8 dashes[] = { 4, 4 };
+
       GTK_CLIST_SET_FLAG (clist, CLIST_ADD_MODE);
       gdk_gc_set_line_attributes (clist->xor_gc, 1,
                                  GDK_LINE_ON_OFF_DASH, 0, 0);
-      gdk_gc_set_dashes (clist->xor_gc, 0, "\4\4", 2);
+      gdk_gc_set_dashes (clist->xor_gc, 0, dashes, G_N_ELEMENTS (dashes));
     }
   else
     {
@@ -5109,9 +5113,11 @@ gtk_clist_button_release (GtkWidget      *widget,
 
       if (GTK_CLIST_ADD_MODE(clist))
        {
+         gint8 dashes[] = { 4, 4 };
+
          gdk_gc_set_line_attributes (clist->xor_gc, 1,
                                      GDK_LINE_ON_OFF_DASH, 0, 0);
-         gdk_gc_set_dashes (clist->xor_gc, 0, "\4\4", 2);
+         gdk_gc_set_dashes (clist->xor_gc, 0, dashes, G_N_ELEMENTS (dashes));
        }
 
       width = new_column_width (clist, i, &x);
index c3dd938438345e9e213529531933e5ad0bc5401e..a396db543afb688a5b31ec15aa532df548d425fb 100644 (file)
@@ -748,9 +748,11 @@ gtk_ctree_realize (GtkWidget *widget)
 
   if (ctree->line_style == GTK_CTREE_LINES_DOTTED)
     {
+      gint8 dashes[] = { 1, 1 };
+
       gdk_gc_set_line_attributes (ctree->lines_gc, 1, 
                                  GDK_LINE_ON_OFF_DASH, GDK_CAP_BUTT, GDK_JOIN_MITER);
-      gdk_gc_set_dashes (ctree->lines_gc, 0, "\1\1", 2);
+      gdk_gc_set_dashes (ctree->lines_gc, 0, dashes, G_N_ELEMENTS (dashes));
     }
 }
 
@@ -5315,6 +5317,8 @@ gtk_ctree_set_line_style (GtkCTree          *ctree,
 
   if (GTK_WIDGET_REALIZED (ctree))
     {
+      gint8 dashes[] = { 1, 1 };
+
       switch (line_style)
        {
        case GTK_CTREE_LINES_SOLID:
@@ -5326,7 +5330,7 @@ gtk_ctree_set_line_style (GtkCTree          *ctree,
          if (GTK_WIDGET_REALIZED (ctree))
            gdk_gc_set_line_attributes (ctree->lines_gc, 1, 
                                        GDK_LINE_ON_OFF_DASH, GDK_CAP_BUTT, GDK_JOIN_MITER);
-         gdk_gc_set_dashes (ctree->lines_gc, 0, "\1\1", 2);
+         gdk_gc_set_dashes (ctree->lines_gc, 0, dashes, G_N_ELEMENTS (dashes));
          break;
        case GTK_CTREE_LINES_TABBED:
          if (GTK_WIDGET_REALIZED (ctree))